//
//  BlipMessage.h
//  blipTest
//
//  Created by dawid on 08-12-14.
//  Copyright 2008 __MyCompanyName__. All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import "ABlipConstants.h"
/*
 'id': 1,
 'created_at': "2007-10-18 11:27:20",
 'transport': {'id': 6, 'name': 'www'},
 'body': 'foobar http://rdir.pl/jk2hg',
 'type': 'Status',
 'user_path': '/users/frania',
 'pictures_path': '/updates/1/pictures',
 'recording_path': '/updates/1/recording',
 'movie_path': '/updates/12/movie'
 */
@interface BlipMessage : NSObject {
	NSString* msgId;
	NSCalendarDate* createdAt;
	NSString* body;
	NSString* msgType;
	NSString* userPath;
	NSString* recipientPath;
	NSString* picturePath;
	NSData* pictureData;
	NSString* recordingPath;
	NSString* moviePath;
	NSData* userAvatar;
	NSData* recipientAvatar;
	NSString *userName;
	NSString *recipientName;
	NSString *userAvatarPath;
	NSString *recipientAvatarPath;
	NSString *authorizationString;
	BOOL canDeleteMessage;
	NSData* youtubeThumbnail;
	NSString* youtubeQtLink;
	NSString *userSex;
	NSMutableAttributedString* attributedBody;
}
@property (readwrite, copy)NSMutableAttributedString* attributedBody;
@property (readwrite, copy)NSString* youtubeQtLink;
@property (readwrite, assign)NSData* youtubeThumbnail;
-(id)initWithJSON:(NSDictionary*)jsonValues authorization:(NSString*)value;
-(void)downloadAvatars;
-(void)downloadAvatar:(NSString*)avatarPath receiverType:(BOOL)recipient;
-(void)downloadPicture;
-(NSData*)sendRequest:(NSURLRequest*)request;
-(BOOL)checkAvatarExistance:(NSString*)avatarPath userType:(BOOL)recipient;
-(void)saveAvatar:(NSString*)avatarPath avatarData:(NSData*)data isUser:(BOOL)notRecipient;


-(void)setMsgId:(NSString*)messageId;
-(NSString*)msgId;
-(void)setCreatedAt:(NSString*)creationDate;
-(NSCalendarDate*)createdAt;
-(void)setBody:(NSString*)msgText;
-(NSString*)body;
-(void)setMsgType:(NSString*)newType;
-(NSString*)msgType;
-(void)setUserPath:(NSString*)newUserPath;
-(NSString*)userPath;
-(void)setRecipientPath:(NSString*)newRecipientPath;
-(NSString*)recipientPath;
-(void)setPicturePath:(NSString*)newPicturePath;
-(NSString*)picturePath;
-(void)setPictureData:(NSData*)picture;
-(NSData*)pictureData;
-(void)setUserAvatar:(NSData*)avatar;
-(NSData*)userAvatar;
-(void)setRecipientAvatar:(NSData*)avatar;
-(NSData*)recipientAvatar;
-(void)setUserName:(NSString*)newUserName;
-(NSString*)userName;
-(void)setRecipientName:(NSString*)newRecipientName;
-(NSString*)recipientName;
-(void)setUserAvatarPath:(NSString*)newPath;
-(NSString*)userAvatarPath;
-(void)setRecipientAvatarPath:(NSString*)newPath;
-(NSString*)recipientAvatarPath;
-(void)setUserSex:(NSString*)newOrientation;
-(NSString*)userSex;
-(void)setCanDeleteMessage:(BOOL)canDelete;
-(BOOL)canDeleteMessage;
-(NSString*)checkDownloadData:(NSData*)data;
-(void)downloadSynchronousExtendedMsg;
-(void)downloadQuote;
//+(id)regexQuote;
//+(id)regexDirectQuote;
@end
